package com.ruoyi.InboundManagement.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.InboundManagement.mapper.ReceivingInboundMapper;
import com.ruoyi.InboundManagement.domain.ReceivingInbound;
import com.ruoyi.InboundManagement.service.IReceivingInboundService;

/**
 * 收货入库管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-03
 */
@Service
public class ReceivingInboundServiceImpl implements IReceivingInboundService 
{
    @Autowired
    private ReceivingInboundMapper receivingInboundMapper;

    /**
     * 查询收货入库管理
     * 
     * @param receivingId 收货入库管理主键
     * @return 收货入库管理
     */
    @Override
    public ReceivingInbound selectReceivingInboundByReceivingId(Long receivingId)
    {
        return receivingInboundMapper.selectReceivingInboundByReceivingId(receivingId);
    }

    /**
     * 查询收货入库管理列表
     * 
     * @param receivingInbound 收货入库管理
     * @return 收货入库管理
     */
    @Override
    public List<ReceivingInbound> selectReceivingInboundList(ReceivingInbound receivingInbound)
    {
        return receivingInboundMapper.selectReceivingInboundList(receivingInbound);
    }

    /**
     * 新增收货入库管理
     * 
     * @param receivingInbound 收货入库管理
     * @return 结果
     */
    @Override
    public int insertReceivingInbound(ReceivingInbound receivingInbound)
    {
        receivingInbound.setCreateTime(new Date());
        return receivingInboundMapper.insertReceivingInbound(receivingInbound);
    }

    /**
     * 修改收货入库管理
     * 
     * @param receivingInbound 收货入库管理
     * @return 结果
     */
    @Override
    public int updateReceivingInbound(ReceivingInbound receivingInbound)
    {
        return receivingInboundMapper.updateReceivingInbound(receivingInbound);
    }

    /**
     * 批量删除收货入库管理
     * 
     * @param receivingIds 需要删除的收货入库管理主键
     * @return 结果
     */
    @Override
    public int deleteReceivingInboundByReceivingIds(Long[] receivingIds)
    {
        return receivingInboundMapper.deleteReceivingInboundByReceivingIds(receivingIds);
    }

    /**
     * 删除收货入库管理信息
     * 
     * @param receivingId 收货入库管理主键
     * @return 结果
     */
    @Override
    public int deleteReceivingInboundByReceivingId(Long receivingId)
    {
        return receivingInboundMapper.deleteReceivingInboundByReceivingId(receivingId);
    }
}
